// 定义首页需要的接口函数
import request from '@/utils/request'

/**
 * 获取首页头部分类数据
 */
export const findAllCategory = () => {
  return request('/home/category/head', 'get')
}

// 根据id获取顶级分类消息
export const findTopCategory = id => {
  return request('/category', 'get', { id })
}

// 二级分类筛选条件接口
export const findSubCategoryFilter = id => {
  return request('/category/sub/filter', 'get', { id })
}

// 商品列表接口
export const findSubCategoryGoods = params => {
  return request('/category/goods/temporary', 'post', params)
}
